package com.study.lu.thread.producercustomer;

import com.study.lu.thread.producercustomer.CustomerThread;
import com.study.lu.thread.producercustomer.Food;
import com.study.lu.thread.producercustomer.ProducerThread;
import com.study.lu.thread.producercustomer.oldjdk.FoodFactory;

import java.util.ArrayList;
import java.util.List;

/**
 * <b>System：</b>incommonusefactory<br/>
 * <b>Title：</b>test.java<br/>
 * <b>Description：</b> 对功能点的描述<br/>
 * <b>@author： </b>raoluping<br/>
 * <b>@date：</b>2017/12/20 17:30<br/>
 * <b>@version：</b> 1.0.0.0 <br/>
 * <b>Copyright (c) 2017 ASPire Tech.</b>
 */
public class test {
    public static void main(String[] args) {
        List<Food> foods =new ArrayList<>();
        FoodFactory foodFactory = new FoodFactory();

        ProducerThread producerThread = new ProducerThread("生产者", foodFactory);

        CustomerThread customerThread = new CustomerThread("消费者", foodFactory);

      /*  for(int i = 0;i<10;i++){
            new Thread(producerThread).start();
            new Thread(customerThread).start();
        }*/

        new Thread(producerThread).start();
        new Thread(customerThread).start();



    }
}
